package the.workshop.bu.dto;

import lombok.Data;
import org.springframework.util.StringUtils;
import the.workshop.bu.constant.CheckTypeEnum;

import java.io.Serializable;

@Data
public class CheckTelQueryDTO implements Serializable {

    private static final long serialVersionUID = -523157981197146507L;
    private int checkType;
    private int bizType = 1;
    private String customerStatus;
    private String customerIds;
    private String[] customerIdList;

    public String getCustomerStatus() {
        return CheckTypeEnum.MOBILE_NAME.getValue() == checkType ? "01000" : null;
    }

    public String[] getCustomerIdList() {
        if (StringUtils.hasText(customerIds)) {
            return customerIds.split(",");
        }
        return null;
    }

}
